const util = require('../../../utils/util.js');
const api = require('../../../config/api.js');
Page({

  /**
   * 页面的初始数据
   */
  data: {
    user: {}
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onShow: function(options) {
    let user = util.getUser();
    if (user) {
      this.setData({
        user: user
      });
    }
  },

  toOrders: function() {
    util.isLogin('/pages/vip/myOrder/myOrder?type=-1');
  },
  toWait: function() {
    util.isLogin('/pages/vip/myOrder/myOrder?type=0');
  },
  toSend: function() {
    util.isLogin('/pages/vip/myOrder/myOrder?type=5');
  },
  toComment: function() {
    util.isLogin('/pages/vip/myOrder/myOrder?type=8');
  },
  toCard: function() {
    util.isLogin('/pages/card/cardList/cardList');
  },
  toAddress: function() {
    util.isLogin('/pages/vip/address/address');
  }

})